<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path;
    request.setAttribute("ctx", basePath);
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Bootstrap后台管理系统</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <!-- basic styles -->
    <link href="${ctx}/ace/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="${ctx}/ace/assets/css/font-awesome.min.css" />

    <!--[if IE 7]>
    <link rel="stylesheet" href="${ctx}/ace/assets/css/font-awesome-ie7.min.css" />
    <![endif]-->

    <!-- page specific plugin styles -->
    <link rel="stylesheet" type="text/css" href="${ctx}/resources/plugin/easyui/themes/bootstrap/easyui.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/resources/plugin/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/resources/plugin/datepicker/jquery-ui-1.10.4.datepicker.css">
    <link rel="stylesheet" href="${ctx}/ace/assets/css/jquery.gritter.css" />
    <!-- fonts -->
    <%--<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />--%>

    <!-- ace styles -->
    <link rel="stylesheet" href="${ctx}/ace/assets/css/ace.min.css" />
    <link rel="stylesheet" href="${ctx}/ace/assets/css/ace-rtl.min.css" />
    <link rel="stylesheet" href="${ctx}/ace/assets/css/ace-skins.min.css" />
    <!--[if lte IE 8]>
    <link rel="stylesheet" href="${ctx}/ace/assets/css/ace-ie.min.css" />
    <![endif]-->
    <link rel="stylesheet" href="${ctx}/css/common.css" />

    <!-- inline styles related to this page -->
    <!-- ace settings handler -->
    <script src="${ctx}/ace/assets/js/ace-extra.min.js"></script>
    <script src="${ctx}/js/common/jquery-1.8.0.min.js"></script>
    <sitemesh:write property='head'></sitemesh:write>
</head>


<body>
<div class="navbar navbar-default" id="navbar">
<div class="navbar-container" id="navbar-container">
<div class="navbar-header pull-left">
    <a href="#" class="navbar-brand">
        <small>
            <i class="icon-leaf"></i>
            后台管理系统
        </small>
    </a><!-- /.brand -->
</div><!-- /.navbar-header -->
</div><!-- /.container -->
</div>

<div class="main-container" id="main-container">
<div class="main-container-inner">
<a class="menu-toggler" id="menu-toggler" href="#">
    <span class="bootstrap-menu-text"></span>
</a>

<div class="sidebar" id="sidebar">
<ul class="nav nav-list">
<li class="active">
    <a href="index.html">
        <i class="icon-dashboard"></i>
        <span class="bootstrap-menu-text"> 控制台 </span>
    </a>
</li>
<li class="active open">
    <a href="#" class="dropdown-toggle">
        <i class="icon-desktop"></i>
        <span class="bootstrap-menu-text"> 场景测试</span>

        <b class="arrow icon-angle-down"></b>
    </a>

    <ul class="submenu">
        <li >
            <a href="${ctx}/demo/index.do">
                <i class="icon-double-angle-right"></i>
                单个实体
            </a>
        </li>

        <li class="active">
            <a href="${ctx}/demo/add.do">
                <i class="icon-double-angle-right"></i>
                树形测试
            </a>
        </li>

        <li>
            <a href="#" class="dropdown-toggle">
                <i class="icon-double-angle-right"></i>

                三级菜单
                <b class="arrow icon-angle-down"></b>
            </a>

            <ul class="submenu">
                <li>
                    <a href="#">
                        <i class="icon-leaf"></i>
                        第一级
                    </a>
                </li>

                <li>
                    <a href="#" class="dropdown-toggle">
                        <i class="icon-pencil"></i>

                        第四级
                        <b class="arrow icon-angle-down"></b>
                    </a>

                    <ul class="submenu">
                        <li>
                            <a href="#">
                                <i class="icon-plus"></i>
                                添加产品
                            </a>
                        </li>

                        <li>
                            <a href="#">
                                <i class="icon-eye-open"></i>
                                查看商品
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </li>
    </ul>
</li>
<li class="active open">
        <a href="#" class="dropdown-toggle">
            <i class="icon-desktop"></i>
            <span class="bootstrap-menu-text">权限管理</span>

            <b class="arrow icon-angle-down"></b>
        </a>

        <ul class="submenu">
            <li >
                <a href="${ctx}/pRole/index.do">
                    <i class="icon-double-angle-right"></i>
                    角色管理
                </a>
            </li>
            <li >
                <a href="${ctx}/pUser/index.do">
                    <i class="icon-double-angle-right"></i>
                    用户管理
                </a>
            </li>
        </ul>
    </li>
<li>
    <a href="#" class="dropdown-toggle">
        <i class="icon-file-alt"></i>

								<span class="bootstrap-menu-text">
									其他页面
									<span class="badge badge-primary ">5</span>
								</span>

        <b class="arrow icon-angle-down"></b>
    </a>

    <ul class="submenu">
        <li>
            <a href="faq.html">
                <i class="icon-double-angle-right"></i>
                帮助
            </a>
        </li>
        <li>
            <a href="blank.html">
                <i class="icon-double-angle-right"></i>
                空白页面
            </a>
        </li>
    </ul>
</li>
</ul><!-- /.nav-list -->
</div>

<div class="main-content">
    <div class="breadcrumbs" id="breadcrumbs">

        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
              场景测试
            </li>

            <li>
                <a href="#">单个实体</a>
            </li>
            <li class="active">单个实体列表</li>
        </ul><!-- .breadcrumb -->

        <div class="nav-search" id="nav-search">
            <form class="form-search">
								<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="icon-search nav-search-icon"></i>
								</span>
            </form>
        </div><!-- #nav-search -->
    </div>

    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->
                <sitemesh:write property='body'></sitemesh:write>

                <!-- PAGE CONTENT ENDS -->
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.page-content -->
</div><!-- /.main-content -->

</div><!-- /.main-container-inner -->

</div><!-- /.main-container -->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- basic scripts -->
<!-- script -->
<script type="text/javascript">
    if("ontouchend" in document) document.write("<script src='${ctx}/ace/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
</script>
<script src="${ctx}/ace/assets/js/bootstrap.min.js"></script>
<script src="${ctx}/ace/assets/js/typeahead-bs2.min.js"></script>

<!-- ace scripts -->
<script src="${ctx}/ace/assets/js/ace-elements.min.js"></script>
<script src="${ctx}/ace/assets/js/ace.min.js"></script>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    try{ace.settings.navbar_fixed(true)}catch(e){}
    try{ ace.settings.main_container_fixed(false)}catch(e){}
    try{ace.settings.sidebar_fixed(true)}catch(e){}
    try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
    try{ace.settings.breadcrumbs_fixed(true)}catch(e){}
    $(function(){
        $.ajaxSetup ({
            cache: false //关闭AJAX相应的缓存
        });
        var currentURL= '${currentURL}';
        currentURL = currentURL.replace(/\./g,'\\.').replace(/\//g,'\\/');
        $('li').removeClass('open');
        $('li').removeClass('active');
        var obj = $('a[href*='+currentURL+']').closest('li');
        obj.addClass('active');
        obj.parents('li').attr('class','active open');
    })
//    $('table th input:checkbox').on('click' , function(){
//        var that = this;
//        $(this).closest('table').find('tr > td:first-child input:checkbox')
//                .each(function(){
//                    this.checked = that.checked;
//                    $(this).closest('tr').toggleClass('selected');
//                });
//    });

    $('body').on('click', 'table th input:checkbox', function () {
        var that = this;
        $(this).closest('table').find('tr > td:first-child input:checkbox').each(function () {
            this.checked = that.checked;
            $(this).closest('tr').toggleClass('selected');
        });
    });
</script>
<%-- special --%>
<script src="${ctx}/ace/assets/js/bootbox.min.js"></script>
<script src="${ctx}/ace/assets/js/jquery.gritter.min.js"></script>
<sitemesh:write property='before_footer'></sitemesh:write>
<!-- page specific plugin styles -->
<script src="${ctx}/js/common/common.js"></script>
<sitemesh:write property='footer'></sitemesh:write>
<sitemesh:write property='after_footer'></sitemesh:write>
</body>
</html>
